package com.example.chamberlainserver.config;

import com.example.chamberlainserver.security.NoOpPasswordEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.password.PasswordEncoder;

@Configuration
public class SecurityBeanConfig {
    
    @Bean
    public PasswordEncoder passwordEncoder() {
        // 使用NoOpPasswordEncoder，不对密码进行加密处理
        // 前端会负责密码的加密，后端直接保存和比对加密后的密文
        return new NoOpPasswordEncoder();
    }
}